﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.ComponentModel.DataAnnotations;
using Resources;

namespace SketchTour.Models
{
    [MetadataTypeAttribute(typeof(MSHT00Models.MSHT00ModelsMetadata))]
    public partial class MSHT00Models
    {
        public long ID { get; set; }
        public string CityCode { get; set; }
        public string Name { get; set; }
        public Nullable<long> ServiceTypeID { get; set; }
        public string Tel { get; set; }
        public string Fax { get; set; }
        public string Email { get; set; }
        public string Address { get; set; }
        public string Note { get; set; }
        public Nullable<bool> IsDelete { get; set; }
        public Nullable<System.DateTime> CreateDate { get; set; }
        public string CreateBy { get; set; }
        public Nullable<System.DateTime> UpdateDate { get; set; }
        public string UpdateBy { get; set; }

        public string CityName { get; set; }
        public string ServiceName { get; set; }

        internal sealed class MSHT00ModelsMetadata
        {
            
            [Required(ErrorMessageResourceType=typeof(Resources.Resource), ErrorMessageResourceName = "MSHT00_SCR_txtCityCode")]
            public string CityCode;
            [Required(ErrorMessageResourceType = typeof(Resources.Resource), ErrorMessageResourceName = "MSHT00_SCR_txtName")]
            public string Name;
            [Required(ErrorMessageResourceType = typeof(Resources.Resource), ErrorMessageResourceName = "MSHT00_SCR_txtServiceType")]
            public Nullable<long> ServiceTypeID;
            [Required(ErrorMessageResourceType = typeof(Resources.Resource), ErrorMessageResourceName = "MSHT00_SCR_txtTel")]
            public string Tel;
            public string Fax;
            
            [Required(ErrorMessageResourceType = typeof(Resources.Resource), ErrorMessageResourceName = "MSHT00_SCR_txtEmail")]
            [RegularExpression(@"\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*", ErrorMessageResourceType = typeof(Resources.Resource), ErrorMessageResourceName = "MSHT00_SCR_txtEmailFormat")]
            public string Email;
            [Required(ErrorMessageResourceType = typeof(Resources.Resource), ErrorMessageResourceName = "MSHT00_SCR_txtAddress")]
            public string Address;
            public string Note;
            public Nullable<bool> IsDelete;
            public Nullable<System.DateTime> CreateDate;
            public string CreateBy;
            public Nullable<System.DateTime> UpdateDate;
            public string UpdateBy;
        }

    }
    public static class MSHT00Key
    {
        public const string ID = "ID";
        public const string CityCode = "CityCode";
        public const string ServiceTypeID = "ServiceTypeID";
        public const string Tel = "Tel";
        public const string Fax = "Fax";
        public const string Email = "Email";
        public const string Address = "Address";
        public const string Note = "Note";
        public const string IsDelete = "IsDelete";
        public const string CreateDate = "CreateDate";
        public const string CreateBy = "CreateBy";
        public const string UpdateDate = "UpdateDate";
        public const string UpdateBy = "UpdateBy";

        public const string City = "Code";
        public const string CityName = "Name";

        public const string ServiceID = "ID";
        public const string ServiceName = "Name";

    }
}